<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
	<f:layout name="Default" />

	This Template is responsible for creating a table of domain objects.

	If you modify this template, do not forget to change the overwrite settings
	in /Configuration/ExtensionBuilder/settings.yaml:
	  Resources:
		Private:
		  Templates:
			List.html: keep

	Otherwise your changes will be overwritten the next time you save the extension in the extension builder

	<f:section name="content">

		<f:flashMessages />
		<f:if condition="{settings.listType}==1">
      		<f:then>
      		<!-- PDF文件 -->
				<div class="portlet light ">
				    <div class="portlet-title">
				        <div class="caption">
				             <f:link.action action="new" class="btn btn-info">增加</f:link.action>
				        </div>
				        <div class="actions">
				            <div class="btn-group btn-group-devided">
				                <f:form action="list" name="search" class="form-inline" method="GET">
				                    <div class="input-group">
				                        <div class="input-icon">
				                            <i class="fa fa-search"></i>
				                            <f:form.textfield name="keyword" value="{keyword}" class="form-control" placeholder="请输入查询条件"/>
				                        </div>
				                        <span class="input-group-btn">
				                            <f:form.submit class="btn btn-success" value="搜" />
				                        </span>
				                    </div>
				                </f:form>
				            </div>
				        </div>
				    </div>
				    <f:widget.paginate objects="{filemanages}" as="filemanagesPagination"  configuration="{settings.paginate}">
					    <div class="portlet-body">
					        <div class="table-scrollable">
					            <table class="table table-hover table-light">
					                <thead>
					                    <tr class="uppercase">
					                       <th>序号</th>
				                            <th>文件名称</th >
				                            <th>文件类别</th >
				                            <th>发布时间 </th >
				                            <th>排序</th>
				                            <th>下载</th >
				                            <th class="text-center">操作</th>
					                    </tr>
					                </thead>
					                <tbody>
					                    <f:for each="{filemanagesPagination}" as="filemanage" iteration="item">
					                        <tr>
					                        	<td class="text-left">
					                                {f:cObject(typoscriptObjectPath:'lib.calc', data:'{item.cycle}+({page}-1)*{settings.paginate.itemsPerPage}')}
					                            </td>
					                            <td>{filemanage.title}</td>
					                            <td>
					                            	{filemanage.filetypes.name}
					                            </td>
					                            <td>{filemanage.senddate}</td>
					                            <td>{filemanage.sort}</td>
					                            <td><f:link.action action="download" arguments="{filemanage : filemanage}">下载</f:link.action></td>
					                            <td class="text-center">
					                                <f:link.action action="edit" arguments="{filemanage : filemanage}" class="btn btn-info btn-xs edit">编辑</f:link.action>
					                                <f:link.action action="delete" arguments="{filemanage : filemanage}" onclick="return confirm('您确定要删除吗?');" class="btn btn-danger btn-xs delete btn-del">删除</f:link.action>
					                            </td>
					                        </tr>
				                        </f:for>
					                </tbody>
					            </table>
					        </div>
					    </div>
					</f:widget.paginate>
				</div>
			</f:then>
			<f:else>
			<!-- 其他文件 -->
				<div class="portlet light ">
				    <div class="portlet-title">
				        <div class="caption">
				             <f:link.action action="new" class="btn btn-info">增加</f:link.action>
				        </div>
				        <div class="actions">
				            <div class="btn-group btn-group-devided">
				                <f:form action="list" name="search" class="form-inline" method="GET">
				                    <div class="input-group">
				                        <div class="input-icon">
				                            <i class="fa fa-search"></i>
				                            <f:form.textfield name="keyword" value="{keyword}" class="form-control" placeholder="文件名称查询"/>
				                        </div>
				                        <span class="input-group-btn">
				                            <f:form.submit class="btn btn-success" value="搜" />
				                        </span>
				                    </div>
				                </f:form>
				            </div>
				        </div>
				    </div>
				    <f:widget.paginate objects="{filemanages}" as="filemanagesPagination"  configuration="{settings.paginate}">
					    <div class="portlet-body">
					        <div class="table-scrollable">
					            <table class="table table-hover table-light">
					                <thead>
					                    <tr class="uppercase">
					                       <th>序号</th>
				                            <th>文件名称</th >
				                            <th>文件类别</th >
				                            <th>发布时间 </th >
				                            <th>排序</th>
				                            <th>下载</th >
				                            <th class="text-center">操作</th>
					                    </tr>
					                </thead>
					                <tbody>
					                    <f:for each="{filemanagesPagination}" as="filemanage" iteration="item">
					                        <tr>
					                        	<td class="text-left">
					                                {f:cObject(typoscriptObjectPath:'lib.calc', data:'{item.cycle}+({page}-1)*{settings.paginate.itemsPerPage}')}
					                            </td>
					                            <td>{filemanage.title}</td>
					                            <td>
					                            	{filemanage.filetypes.name}
					                            </td>
					                            <td>{filemanage.senddate}</td>
					                            <td>{filemanage.sort}</td>
					                            <td><f:link.action action="download" arguments="{filemanage : filemanage}">下载</f:link.action></td>
					                            <td class="text-center">
					                                <f:link.action action="edit" arguments="{filemanage : filemanage}" class="btn btn-info btn-xs edit">编辑</f:link.action>
					                                <f:link.action action="delete" arguments="{filemanage : filemanage}" onclick="return confirm('您确定要删除吗?');" class="btn btn-danger btn-xs delete btn-del">删除</f:link.action>
					                            </td>
					                        </tr>
				                        </f:for>
					                </tbody>
					            </table>
					        </div>
					    </div>
					</f:widget.paginate>
				</div>
			</f:else>
		</f:if>
	</f:section>
</html>